import Vue from "vue";
import VueRouter from "vue-router";
import HomeView from "../views/HomeView.vue";
import Layout from "../components/layout/index";
import LayoutHome from "../components/layout/Home";


Vue.use(VueRouter);

const routes = [
  {
    path: "/",
    name: "home",
    component: LayoutHome,
    redirect: '/index',
    children: [
      {
        path: '/index',
        name: 'index',
        component: () => import('@/views/elm/index'),
      },
      // {
      //   path: '/about',
      //   name: 'about',
      //   component: () => import('@/views/about/about'),
      // },
      // {
      //   path: '/structure',
      //   name: 'structure',
      //   component: () => import('@/views/about/structure'),
      // },
      // {
      //   path: '/case',
      //   name: 'case',
      //   component: () => import('@/views/case/case'),
      // },
      // {
      //   path: '/culture',
      //   name: 'culture',
      //   component: () => import('@/views/about/culture'),
      // }
      
    ]
  },
];

const router = new VueRouter({
  mode: 'history', // 去掉url中的#
  scrollBehavior: () => ({ y: 0 }),
  routes,
});

export default router;
